import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { SmartadminModule } from '../shared/smartadmin.module'
import { homePageRouting } from './home-page.routing'
import { HomePageComponent } from './home-page.component'

// 动态组件相关
import { WidgetComponent } from './widget/widget.component'
import { WidgetDirective } from './widget/widget.directive'
import { LoadingDirective } from '../loading/loading.directive';
import { commonItemsModalModule } from './widget/components/common-items-modal/common-items-modal.module' //多选框组件引入
import { CalendarWidgetComponent } from './widget/components/calendar-widget/calendar-widget.component'
// import { TimeComponent } from './widget/components/time/time.component'
// import { EchartsComponent } from './widget/components/echarts/echarts.component'

// 日历
import { InstallStatisticsComponent } from './widget/components/install-statistics/installStatistics.component'
import { RenewStatisticsComponent } from './widget/components/renew-statistics/renewStatistics.component'
import { RepairStatisticsComponent } from './widget/components/repair-statistics/repairStatistics.component'

import { InstallCarMapComponent } from './widget/components/install-car-map/install-car-map.component' // 安装车辆地图

import { InstallFactoryDetailsComponent } from './widget/components/install-factory-details/install-factory-details.component' //安装厂区详情
import { RenewFactoryDetailsComponent } from './widget/components/renew-factory-details/renew-factory-details.component' //安装厂区详情
import { RepairFactoryDetailsComponent } from './widget/components/repair-factory-details/repair-factory-details.component' //维修厂区详情
import { InventoryFactoryDetailsComponent } from './widget/components/inventory-factory-details/inventory-factory-details.component' //库存厂区详情

import { DatabaseSum } from './widget/components/database-sum/database-sum.component'
import { MiniProgram } from './widget/components/mini-program/mini-program.component'
import { ApiInvoke } from './widget/components/api-invoke/api-invoke.component'
import { CarryDistance } from './widget/components/carry-distance/carry-distance.component'
import { CarryWeight } from './widget/components/carry-weight/carry-weight.component'
import { CarryCount } from './widget/components/carry-count/carry-count.component'
import { TotalCarNumber } from './widget/components/total-car-number/total-car-number.component'
import { OnlineCarNumber } from './widget/components/online-car-number/online-car-number.component'
import { OfflineCarNumber } from './widget/components/offline-car-number/offline-car-number.component'
import { OnlineRate } from './widget/components/online-rate/online-rate.component'
import { TrafficEchartsMins } from './widget/components/traffic-echarts-mins/traffic-echarts-mins.component'
import { TrafficEchartsDay } from './widget/components/traffic-echarts-day/traffic-echarts-day.component'
import { UserApiInvoke } from './widget/components/user-api-invoke/user-api-invoke.component'
import { ApiInvokeRank } from './widget/components/api-invoke-rank/api-invoke-rank.component'

const exportComponents = [
  InstallFactoryDetailsComponent,
  RenewFactoryDetailsComponent,
  RepairFactoryDetailsComponent,
  InventoryFactoryDetailsComponent,
  DatabaseSum,
  MiniProgram,
  ApiInvoke,
  CarryDistance,
  CarryWeight,
  CarryCount,
  TotalCarNumber,
  OnlineCarNumber,
  OfflineCarNumber,
  OnlineRate,
  TrafficEchartsMins,
  TrafficEchartsDay,
  UserApiInvoke,
  ApiInvokeRank,
  InstallStatisticsComponent,
  RenewStatisticsComponent,
  RepairStatisticsComponent,
  InstallCarMapComponent
]

@NgModule({
  imports: [CommonModule, SmartadminModule, homePageRouting, commonItemsModalModule],
  declarations: [HomePageComponent, WidgetComponent, WidgetDirective, LoadingDirective, CalendarWidgetComponent, ...exportComponents],
  entryComponents: [...exportComponents], // entryComponents: 所有通过类型进行命令式加载的组件都是入口组件
  providers: []
})
export class HomePageModule {}
